Skip to content

Conversation

innocenzi
Copy link

@innocenzi innocenzi commented Aug 15, 2025

πŸ”— Linked issue

Closes #4233
Related to #4341

❓ Type of change

  • πŸ‘Œ Enhancement (improving an existing functionality)

πŸ“š Description

This pull request is an attempt at allowing the use of Nuxt UI in frameworks that don't require vue-router. This is the case in Inertia applications (even if Inertia currently has its own exception built in Nuxt UI), in Hybridly applications, in SPAs without routing, etc.

I took the same approach as the Inertia override: if the new router option is set to false, it will load stubs without vue-router.

Copy link

pkg-pr-new bot commented Aug 15, 2025

npm i https://pkg.pr.new/@nuxt/ui@4763

commit: 061dfde

@benjamincanac benjamincanac requested a review from romhml August 16, 2025 10:02
@romhml
Copy link
Member

romhml commented Aug 25, 2025

This might introduce complication with the upcomming ui-pro merge and v4 release since some components / features relies on Vue Router. We could consider it but it might be wiser to wait for the v4 release. @benjamincanac what do you think?

@benjamincanac benjamincanac added the v3 #1289 label Aug 27, 2025
@benjamincanac
Copy link
Member

Indeed, I don't see how we can do this without breaking every component that uses <ULink>: https://github.com/search?q=repo:nuxt/ui%20import%20ULink%20from%20'./Link.vue'&type=code

@innocenzi
Copy link
Author

Sorry @benjamincanac I don't get how the currently-implemented Inertia integration would circumvent this issue then?

Copy link
Member

@innocenzi We've overridden the Link and LinkBase components for Inertia to use InertiaLink and usePage: https://github.com/nuxt/ui/tree/v4/src/runtime/inertia/components

@innocenzi
Copy link
Author

@benjamincanac Right, but how come we can't just do the same with a generic Link and LinkBase that would just use a anchors?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v3 #1289
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nuxt UI (vue) without vue-router
3 participants